Integrand size = 23, antiderivative size = 104 \[ \int \csc ^3(e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx=-\frac {(a+b) (a+5 b) \text {arctanh}(\cos (e+f x))}{2 f}-\frac {\left (3 a^2+6 a b+5 b^2\right ) \cot (e+f x) \csc (e+f x)}{6 f}+\frac {b (6 a+5 b) \sec (e+f x)}{3 f}+\frac {b^2 \csc ^2(e+f x) \sec ^3(e+f x)}{3 f} \]
[Out]
Time = 0.13 (sec) , antiderivative size = 104, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {4218, 473, 467, 464, 212} \[ \int \csc ^3(e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx=-\frac {\left (3 a^2+6 a b+5 b^2\right ) \cot (e+f x) \csc (e+f x)}{6 f}-\frac {(a+b) (a+5 b) \text {arctanh}(\cos (e+f x))}{2 f}+\frac {b (6 a+5 b) \sec (e+f x)}{3 f}+\frac {b^2 \csc ^2(e+f x) \sec ^3(e+f x)}{3 f} \]
[In]
[Out]
Rule 212
Rule 464
Rule 467
Rule 473
Rule 4218
Rubi steps \begin{align*} \text {integral}& = -\frac {\text {Subst}\left (\int \frac {\left (b+a x^2\right )^2}{x^4 \left (1-x^2\right )^2} \, dx,x,\cos (e+f x)\right )}{f} \\ & = \frac {b^2 \csc ^2(e+f x) \sec ^3(e+f x)}{3 f}-\frac {\text {Subst}\left (\int \frac {b (6 a+5 b)+3 a^2 x^2}{x^2 \left (1-x^2\right )^2} \, dx,x,\cos (e+f x)\right )}{3 f} \\ & = -\frac {\left (3 a^2+6 a b+5 b^2\right ) \cot (e+f x) \csc (e+f x)}{6 f}+\frac {b^2 \csc ^2(e+f x) \sec ^3(e+f x)}{3 f}+\frac {\text {Subst}\left (\int \frac {-2 b (6 a+5 b)-\left (3 a^2+6 a b+5 b^2\right ) x^2}{x^2 \left (1-x^2\right )} \, dx,x,\cos (e+f x)\right )}{6 f} \\ & = -\frac {\left (3 a^2+6 a b+5 b^2\right ) \cot (e+f x) \csc (e+f x)}{6 f}+\frac {b (6 a+5 b) \sec (e+f x)}{3 f}+\frac {b^2 \csc ^2(e+f x) \sec ^3(e+f x)}{3 f}-\frac {((a+b) (a+5 b)) \text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\cos (e+f x)\right )}{2 f} \\ & = -\frac {(a+b) (a+5 b) \text {arctanh}(\cos (e+f x))}{2 f}-\frac {\left (3 a^2+6 a b+5 b^2\right ) \cot (e+f x) \csc (e+f x)}{6 f}+\frac {b (6 a+5 b) \sec (e+f x)}{3 f}+\frac {b^2 \csc ^2(e+f x) \sec ^3(e+f x)}{3 f} \\ \end{align*}
Leaf count is larger than twice the leaf count of optimal. \(1021\) vs. \(2(104)=208\).
Time = 8.09 (sec) , antiderivative size = 1021, normalized size of antiderivative = 9.82 \[ \int \csc ^3(e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx=\frac {\left (-a^2-2 a b-b^2\right ) \cos ^4(e+f x) \csc ^2\left (\frac {e}{2}+\frac {f x}{2}\right ) \left (a+b \sec ^2(e+f x)\right )^2}{2 f (a+2 b+a \cos (2 e+2 f x))^2}-\frac {2 \left (a^2+6 a b+5 b^2\right ) \cos ^4(e+f x) \log \left (\cos \left (\frac {e}{2}+\frac {f x}{2}\right )\right ) \left (a+b \sec ^2(e+f x)\right )^2}{f (a+2 b+a \cos (2 e+2 f x))^2}+\frac {2 \left (a^2+6 a b+5 b^2\right ) \cos ^4(e+f x) \log \left (\sin \left (\frac {e}{2}+\frac {f x}{2}\right )\right ) \left (a+b \sec ^2(e+f x)\right )^2}{f (a+2 b+a \cos (2 e+2 f x))^2}+\frac {2 b (12 a+13 b) \cos ^4(e+f x) \sec (e) \left (a+b \sec ^2(e+f x)\right )^2}{3 f (a+2 b+a \cos (2 e+2 f x))^2}+\frac {\left (a^2+2 a b+b^2\right ) \cos ^4(e+f x) \sec ^2\left (\frac {e}{2}+\frac {f x}{2}\right ) \left (a+b \sec ^2(e+f x)\right )^2}{2 f (a+2 b+a \cos (2 e+2 f x))^2}+\frac {2 b^2 \cos ^4(e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \sin \left (\frac {f x}{2}\right )}{3 f (a+2 b+a \cos (2 e+2 f x))^2 \left (\cos \left (\frac {e}{2}\right )-\sin \left (\frac {e}{2}\right )\right ) \left (\cos \left (\frac {e}{2}+\frac {f x}{2}\right )-\sin \left (\frac {e}{2}+\frac {f x}{2}\right )\right )^3}+\frac {\cos ^4(e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \left (b^2 \cos \left (\frac {e}{2}\right )+b^2 \sin \left (\frac {e}{2}\right )\right )}{3 f (a+2 b+a \cos (2 e+2 f x))^2 \left (\cos \left (\frac {e}{2}\right )-\sin \left (\frac {e}{2}\right )\right ) \left (\cos \left (\frac {e}{2}+\frac {f x}{2}\right )-\sin \left (\frac {e}{2}+\frac {f x}{2}\right )\right )^2}+\frac {2 \cos ^4(e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \left (12 a b \sin \left (\frac {f x}{2}\right )+13 b^2 \sin \left (\frac {f x}{2}\right )\right )}{3 f (a+2 b+a \cos (2 e+2 f x))^2 \left (\cos \left (\frac {e}{2}\right )-\sin \left (\frac {e}{2}\right )\right ) \left (\cos \left (\frac {e}{2}+\frac {f x}{2}\right )-\sin \left (\frac {e}{2}+\frac {f x}{2}\right )\right )}-\frac {2 b^2 \cos ^4(e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \sin \left (\frac {f x}{2}\right )}{3 f (a+2 b+a \cos (2 e+2 f x))^2 \left (\cos \left (\frac {e}{2}\right )+\sin \left (\frac {e}{2}\right )\right ) \left (\cos \left (\frac {e}{2}+\frac {f x}{2}\right )+\sin \left (\frac {e}{2}+\frac {f x}{2}\right )\right )^3}+\frac {\cos ^4(e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \left (b^2 \cos \left (\frac {e}{2}\right )-b^2 \sin \left (\frac {e}{2}\right )\right )}{3 f (a+2 b+a \cos (2 e+2 f x))^2 \left (\cos \left (\frac {e}{2}\right )+\sin \left (\frac {e}{2}\right )\right ) \left (\cos \left (\frac {e}{2}+\frac {f x}{2}\right )+\sin \left (\frac {e}{2}+\frac {f x}{2}\right )\right )^2}-\frac {2 \cos ^4(e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \left (12 a b \sin \left (\frac {f x}{2}\right )+13 b^2 \sin \left (\frac {f x}{2}\right )\right )}{3 f (a+2 b+a \cos (2 e+2 f x))^2 \left (\cos \left (\frac {e}{2}\right )+\sin \left (\frac {e}{2}\right )\right ) \left (\cos \left (\frac {e}{2}+\frac {f x}{2}\right )+\sin \left (\frac {e}{2}+\frac {f x}{2}\right )\right )} \]
[In]
[Out]
Time = 0.38 (sec) , antiderivative size = 163, normalized size of antiderivative = 1.57
method | result | size |
derivativedivides | \(\frac {a^{2} \left (-\frac {\csc \left (f x +e \right ) \cot \left (f x +e \right )}{2}+\frac {\ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )\right )}{2}\right )+2 a b \left (-\frac {1}{2 \sin \left (f x +e \right )^{2} \cos \left (f x +e \right )}+\frac {3}{2 \cos \left (f x +e \right )}+\frac {3 \ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )\right )}{2}\right )+b^{2} \left (\frac {1}{3 \sin \left (f x +e \right )^{2} \cos \left (f x +e \right )^{3}}-\frac {5}{6 \sin \left (f x +e \right )^{2} \cos \left (f x +e \right )}+\frac {5}{2 \cos \left (f x +e \right )}+\frac {5 \ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )\right )}{2}\right )}{f}\) | \(163\) |
default | \(\frac {a^{2} \left (-\frac {\csc \left (f x +e \right ) \cot \left (f x +e \right )}{2}+\frac {\ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )\right )}{2}\right )+2 a b \left (-\frac {1}{2 \sin \left (f x +e \right )^{2} \cos \left (f x +e \right )}+\frac {3}{2 \cos \left (f x +e \right )}+\frac {3 \ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )\right )}{2}\right )+b^{2} \left (\frac {1}{3 \sin \left (f x +e \right )^{2} \cos \left (f x +e \right )^{3}}-\frac {5}{6 \sin \left (f x +e \right )^{2} \cos \left (f x +e \right )}+\frac {5}{2 \cos \left (f x +e \right )}+\frac {5 \ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )\right )}{2}\right )}{f}\) | \(163\) |
norman | \(\frac {\frac {a^{2}+2 a b +b^{2}}{8 f}+\frac {\left (a^{2}+2 a b +b^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{10}}{8 f}-\frac {\left (7 a^{2}+46 a b +55 b^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{6}}{8 f}-\frac {\left (9 a^{2}+66 a b +65 b^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}}{12 f}+\frac {\left (11 a^{2}+86 a b +75 b^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{4}}{8 f}}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}-1\right )^{3}}+\frac {\left (a^{2}+6 a b +5 b^{2}\right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2 f}\) | \(194\) |
parallelrisch | \(\frac {\frac {3 \left (\frac {\cos \left (3 f x +3 e \right )}{3}+\cos \left (f x +e \right )\right ) \left (a +5 b \right ) \left (a +b \right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2}-\frac {3 \csc \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} \left (\left (a^{2}+\frac {22}{3} a b +\frac {65}{9} b^{2}\right ) \cos \left (3 f x +3 e \right )+\frac {32 \left (a^{2}+2 a b +\frac {5}{3} b^{2}\right ) \cos \left (2 f x +2 e \right )}{3}+\frac {8 \left (a +5 b \right ) \left (a +b \right ) \cos \left (4 f x +4 e \right )}{3}+\left (a^{2}+\frac {22}{3} a b +\frac {65}{9} b^{2}\right ) \cos \left (5 f x +5 e \right )+2 \left (-a^{2}-\frac {22}{3} a b -\frac {65}{9} b^{2}\right ) \cos \left (f x +e \right )+8 a^{2}+\frac {16 a b}{3}-\frac {88 b^{2}}{9}\right ) \sec \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}}{128}}{f \left (\cos \left (3 f x +3 e \right )+3 \cos \left (f x +e \right )\right )}\) | \(216\) |
risch | \(\frac {{\mathrm e}^{i \left (f x +e \right )} \left (3 a^{2} {\mathrm e}^{8 i \left (f x +e \right )}+18 a b \,{\mathrm e}^{8 i \left (f x +e \right )}+15 b^{2} {\mathrm e}^{8 i \left (f x +e \right )}+12 a^{2} {\mathrm e}^{6 i \left (f x +e \right )}+24 a b \,{\mathrm e}^{6 i \left (f x +e \right )}+20 b^{2} {\mathrm e}^{6 i \left (f x +e \right )}+18 a^{2} {\mathrm e}^{4 i \left (f x +e \right )}+12 a b \,{\mathrm e}^{4 i \left (f x +e \right )}-22 b^{2} {\mathrm e}^{4 i \left (f x +e \right )}+12 a^{2} {\mathrm e}^{2 i \left (f x +e \right )}+24 a b \,{\mathrm e}^{2 i \left (f x +e \right )}+20 b^{2} {\mathrm e}^{2 i \left (f x +e \right )}+3 a^{2}+18 a b +15 b^{2}\right )}{3 f \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{3} \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right )^{2}}-\frac {\ln \left ({\mathrm e}^{i \left (f x +e \right )}+1\right ) a^{2}}{2 f}-\frac {3 \ln \left ({\mathrm e}^{i \left (f x +e \right )}+1\right ) a b}{f}-\frac {5 \ln \left ({\mathrm e}^{i \left (f x +e \right )}+1\right ) b^{2}}{2 f}+\frac {\ln \left ({\mathrm e}^{i \left (f x +e \right )}-1\right ) a^{2}}{2 f}+\frac {3 \ln \left ({\mathrm e}^{i \left (f x +e \right )}-1\right ) a b}{f}+\frac {5 \ln \left ({\mathrm e}^{i \left (f x +e \right )}-1\right ) b^{2}}{2 f}\) | \(367\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 193 vs. \(2 (96) = 192\).
Time = 0.26 (sec) , antiderivative size = 193, normalized size of antiderivative = 1.86 \[ \int \csc ^3(e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx=\frac {6 \, {\left (a^{2} + 6 \, a b + 5 \, b^{2}\right )} \cos \left (f x + e\right )^{4} - 4 \, {\left (6 \, a b + 5 \, b^{2}\right )} \cos \left (f x + e\right )^{2} - 4 \, b^{2} - 3 \, {\left ({\left (a^{2} + 6 \, a b + 5 \, b^{2}\right )} \cos \left (f x + e\right )^{5} - {\left (a^{2} + 6 \, a b + 5 \, b^{2}\right )} \cos \left (f x + e\right )^{3}\right )} \log \left (\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right ) + 3 \, {\left ({\left (a^{2} + 6 \, a b + 5 \, b^{2}\right )} \cos \left (f x + e\right )^{5} - {\left (a^{2} + 6 \, a b + 5 \, b^{2}\right )} \cos \left (f x + e\right )^{3}\right )} \log \left (-\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right )}{12 \, {\left (f \cos \left (f x + e\right )^{5} - f \cos \left (f x + e\right )^{3}\right )}} \]
[In]
[Out]
\[ \int \csc ^3(e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx=\int \left (a + b \sec ^{2}{\left (e + f x \right )}\right )^{2} \csc ^{3}{\left (e + f x \right )}\, dx \]
[In]
[Out]
none
Time = 0.18 (sec) , antiderivative size = 126, normalized size of antiderivative = 1.21 \[ \int \csc ^3(e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx=-\frac {3 \, {\left (a^{2} + 6 \, a b + 5 \, b^{2}\right )} \log \left (\cos \left (f x + e\right ) + 1\right ) - 3 \, {\left (a^{2} + 6 \, a b + 5 \, b^{2}\right )} \log \left (\cos \left (f x + e\right ) - 1\right ) - \frac {2 \, {\left (3 \, {\left (a^{2} + 6 \, a b + 5 \, b^{2}\right )} \cos \left (f x + e\right )^{4} - 2 \, {\left (6 \, a b + 5 \, b^{2}\right )} \cos \left (f x + e\right )^{2} - 2 \, b^{2}\right )}}{\cos \left (f x + e\right )^{5} - \cos \left (f x + e\right )^{3}}}{12 \, f} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 341 vs. \(2 (96) = 192\).
Time = 0.35 (sec) , antiderivative size = 341, normalized size of antiderivative = 3.28 \[ \int \csc ^3(e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx=-\frac {\frac {3 \, a^{2} {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac {6 \, a b {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac {3 \, b^{2} {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} - 6 \, {\left (a^{2} + 6 \, a b + 5 \, b^{2}\right )} \log \left (\frac {{\left | -\cos \left (f x + e\right ) + 1 \right |}}{{\left | \cos \left (f x + e\right ) + 1 \right |}}\right ) - \frac {3 \, {\left (a^{2} + 2 \, a b + b^{2} - \frac {2 \, a^{2} {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} - \frac {12 \, a b {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} - \frac {10 \, b^{2} {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1}\right )} {\left (\cos \left (f x + e\right ) + 1\right )}}{\cos \left (f x + e\right ) - 1} - \frac {16 \, {\left (6 \, a b + 7 \, b^{2} + \frac {12 \, a b {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac {12 \, b^{2} {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac {6 \, a b {\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac {9 \, b^{2} {\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}}\right )}}{{\left (\frac {\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1} + 1\right )}^{3}}}{24 \, f} \]
[In]
[Out]
Time = 18.51 (sec) , antiderivative size = 96, normalized size of antiderivative = 0.92 \[ \int \csc ^3(e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx=\frac {\frac {b^2}{3}+{\cos \left (e+f\,x\right )}^2\,\left (\frac {5\,b^2}{3}+2\,a\,b\right )-{\cos \left (e+f\,x\right )}^4\,\left (\frac {a^2}{2}+3\,a\,b+\frac {5\,b^2}{2}\right )}{f\,\left ({\cos \left (e+f\,x\right )}^3-{\cos \left (e+f\,x\right )}^5\right )}-\frac {\mathrm {atanh}\left (\cos \left (e+f\,x\right )\right )\,\left (a+b\right )\,\left (a+5\,b\right )}{2\,f} \]
[In]
[Out]